<?php
$slidelist = db_find('slide', array(), array('rank'=>-1), 1, 1000, 'slideid');
?>
	<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
		<div class="carousel-inner">
			<ol class="carousel-indicators">
				<?php if($slidelist) { foreach ($slidelist as $key => $link) { ?>
				<li data-target="#carouselExampleControls" data-slide-to="<?php echo $key;?>"></li>
				<?php }} ?>
			</ol>
			<?php if($slidelist) { foreach ($slidelist as $key => $link) { ?>
			<div class="carousel-item" data-active="<?php echo $key;?>">
				<a href="<?php echo $link['url'];?>" title="<?php echo $link['name'];?>">
					<img class="d-block w-100 rounded" src="<?php echo $link['slidepic'];?>" alt="<?php echo $link['name'];?>" height="<?php echo $link['picheight'];?>">
					<div class="carousel-caption d-none d-md-block">
						<h5 class="text-white"><?php echo $link['name'];?></h5>
					</div>
				</a>
			</div>
			<?php }} ?>
		</div>
		<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
			<span class="carousel-control-prev-icon" aria-hidden="true"></span>
			<span class="sr-only">Previous</span>
		</a>
		<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
			<span class="carousel-control-next-icon" aria-hidden="true"></span>
			<span class="sr-only">Next</span>
		</a>
	</div>
	<div class="mb-3"></div>